---
title: Analytics
description: 'Per key and per API analytics'
---

Unkey offers both per key and per API analytics that allow you to drive business decisions.

<Note>
  We're currently working on a v2 API for analytics with advanced SQL querying capabilities. This feature is opt-in only and not yet publicly available.
</Note>

## Per API Analytics

Our per API analytics offer a broad overview of the usage for a specific API with total keys, active keys and verifications in the last 30 days.

<Frame caption="Per API Analytics">
  <img src="/images/per-api-analytics.png" alt="Per API Analytics"/>
</Frame>

## Per Key Analytics

Our per key analytics give you a deep dive into each individual key, giving usage data, key data and where the requests originated from. This data can be useful for finding your top users, and where verifications are coming from.

<Frame caption="Per key Analytics">
  <img src="/images/per-key-analytics.png" alt="Per key analytics"/>
</Frame>

## Tags

You can add tags to verification requests to aggregate or filter data when querying.

For example you might want to add the path of your API as a tag: `path=/v1/my-path` and then later retrieve a breakdown of api key usage per unique path.

Unkey does not parse tags in any special way.
The only limitations are:
- Tags are strings.
- You can specify up to 10 tags per request.
- Each tag must be between (including) 1 and 128 characters.

That being said, having some structure for your tags could be benefitial for you.
A common theme is treating them as key-value pairs and specifying them with either a colon or equal-sign as delimiter.
```
key:value
key=value
```

Since Unkey does not know what API routes your user has called or which resources they interact with, we encourage you to record these in the tags.
Here's an example tags for a fictional blog API:


```json
[
  "path=/v1/posts.createPost",
  "postId=post_1asofijqknslkfqWF",
  "region=us-east-1",
  "apiVersion=f8ad21bd", // a git sha of your deployment or semver
]
```

### Using tags

Tags can be added in the request body.

```bash Providing Tags {6-9}
curl --request POST \
  --url https://api.unkey.com/v2/keys.verifyKey \
  --header 'Content-Type: application/json' \
  --data '{
    "key": "sk_1234",
    "tags": [
      "tag1",
      "path=/v1/my-resource/123"
    ]
  }'
```


### Querying tags

Tags can be used to filter and aggregate data in your analytics.
